<template>
    <div class='container'>
        函数调用
        <button @click="handleClick">打开弹窗</button>
    </div>
</template>

<script setup>
import Dialog from '@/components/CustomModal/index'

const handleClick = () => {
    const vm = Dialog('500 服務器錯誤，請稍候再試!', { title: '提示' });//vm是子组件实例
    vm.handleChange()//调用子组件方法
    console.log('获取子组件属性或方法：',vm.childMsg)
}
</script>

<style lang='less' scoped>
.container {}
</style>